home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / share / aclocal-1.5 / winsz.m4 < prev   
Encoding:
M4 Source File  |  2005-10-16  |  911 b   |  37 lines

  1. # From Jim Meyering.
  2.  
  3. # serial 1
  4.  
  5. AC_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
  6. [AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
  7.  AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
  8.             am_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
  9.   [am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
  10.  
  11.   gwinsz_in_termios_h=no
  12.   if test $am_cv_sys_posix_termios = yes; then
  13.     AC_EGREP_CPP([yes],
  14.     [#include <sys/types.h>
  15. #     include <termios.h>
  16. #     ifdef TIOCGWINSZ
  17.         yes
  18. #     endif
  19.     ], gwinsz_in_termios_h=yes)
  20.   fi
  21.  
  22.   if test $gwinsz_in_termios_h = no; then
  23.     AC_EGREP_CPP([yes],
  24.     [#include <sys/types.h>
  25. #     include <sys/ioctl.h>
  26. #     ifdef TIOCGWINSZ
  27.         yes
  28. #     endif
  29.     ], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
  30.   fi
  31.   ])
  32.   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
  33.     AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
  34.               [Define if TIOCGWINSZ requires sys/ioctl.h])
  35.   fi
  36. ])
  37.